<?php
if (false)
{
    $category = new ORM_Category_Data();
}
?>
<form method="post" onsubmit="return MyQEE.form_post(this)">
<div class="tag">
    <ul class="ul">
        <li class="hover" id="mytag_base" onclick="MyQEE.tag(this.id,'mytag','tagmain',this.parentNode,'hover');document.location.hash='';">基本信息</li>
        <li id="mytag_cover" onclick="MyQEE.tag(this.id,'mytag','tagmain',this.parentNode,'hover');document.location.hash='cover';">封面设置</li>
        <li id="mytag_list" onclick="MyQEE.tag(this.id,'mytag','tagmain',this.parentNode,'hover');document.location.hash='list';">列表设置</li>
        <li id="mytag_seo" onclick="MyQEE.tag(this.id,'mytag','tagmain',this.parentNode,'hover');document.location.hash='seo';">SEO设置</li>
        <li id="mytag_perm" onclick="MyQEE.tag(this.id,'mytag','tagmain',this.parentNode,'hover');document.location.hash='perm';">权限设置</li>
<?php
foreach ( View::get_tag('cms.admin.category.form.tag') as $item )
{
?>
        <li id="mytag_<?php echo $item->run('name');?>" onclick="MyQEE.tag(this.id,'mytag','tagmain',this.parentNode,'hover')"><?php echo $item->run('title');?></li>
<?php
}
?>
    </ul>
</div>

<div id="tagmain_base">
    <?php View::factory('admin/cms/category/form/form_base')->render();?>
</div>
<div id="tagmain_cover" style="display:none">
    <?php View::factory('admin/cms/category/form/form_cover')->render();?>
</div>
<div id="tagmain_list" style="display:none">
    <?php View::factory('admin/cms/category/form/form_list')->render();?>
</div>
<div id="tagmain_seo" style="display:none">
    <?php View::factory('admin/cms/category/form/form_seo')->render();?>
</div>
<?php
foreach ( View::get_tag('cms.admin.category.form.tag') as $item )
{
?>
<div id="tagmain_<?php echo $item->run('name');?>" style="display:none">
    <?php echo $item->run('form');?>
</div>
<?php
}
?>
<script type="text/javascript">
var _old_hash = '';
setInterval(function(){
    if ( _old_hash!=document.location.hash )
    {
        var hash = document.location.hash.substr(1);
        var obj = MyQEE.$('mytag_'+hash)||MyQEE.$('mytag_base');
        if (obj)obj.onclick();
        _old_hash = document.location.hash;
    }
},100);
</script>

<div id="toolbar_div">
<table class="mainTable" id="toolbar_table">
	<tr>
		<td class="td1" width="20%"></td>
		<td class="td1">
            <input type="submit" value="立即保存" />
        </td>
	</tr>
</table>
</div>
</form>